package main.Q2301_2400;

public class Q2311_2320 {
    public static void main(String[] args) {
        System.out.println("Question2311：");
        System.out.println("Question2312：");
        System.out.println("Question2313：");
        System.out.println("Question2314：");
        System.out.println("Question2315：统计星号");
        System.out.println("Question2316：");
        System.out.println("Question2317：操作后的最大异或和");
        System.out.println("Question2318：");
        System.out.println("Question2319：");
        System.out.println("Question2320：");
    }
}

class Question2315 {
    public int countAsterisks(String s) {
        boolean start = false;
        int count = 0;
        for (int i = 0; i < s.length(); i++) {
            if (!start && s.charAt(i) == '*') {
                count++;
            } else if (s.charAt(i) == '|') {
                start = !start;
            }
        }
        return count;
    }
}

class Question2317 {
    public int maximumXOR(int[] nums) {
        int max = 0;
        for (int num : nums) {
            max = max | num;
        }
        return max;
    }
}